<!DOCTYPE html>
<html>
<head>
<title>TEST1</title>
<script type="text/javascript" src="js/canvas-painter.js"></script>
<script type="text/javascript" src="js/painter-main.js"></script>
<style type="text/css">

canvas{
	background-color: rgba(0,0,0,0);
/*	display: block;
	position: absolute;
	left: 0px;
	top: 0px;*/
}

</style>
</head>
<body>

<canvas width="600" height="480"></canvas>
<script type="text/javascript">

var size = 32;

var painter = CreatePainterHandle('canvas', {
	autoStop: 0,
	debug: 0,
	mosaicSize: size
});

//预置数据
painter.initImage = function(target){
	var tar = target.getContext('2d');
	tar.beginPath();
	tar.arc(300, 240, 200, Math.PI / 180 * -60, Math.PI / 180 * 240);
	tar.lineTo(300, 240)
	tar.closePath();
	tar.lineWidth = 1;
	tar.strokeStyle = '#000';
	tar.stroke();
	CanvasPainter.drawImageMosaic(
		tar, size, 'rgba(0,0,255,0.2)', tar, 1, 0
	);
};
painter.ondraw = function(score, path){
	console.log(score);
}
painter.init();




</script>

</body>
</html>